package com.huluobo.lib_base.net

import com.huluobo.lib_base.entity.CommentBean
import com.huluobo.lib_base.entity.UserBean
import com.huluobo.lib_base.entity.VideoBean
import okhttp3.RequestBody
import retrofit2.http.Body
import retrofit2.http.GET
import retrofit2.http.POST
import retrofit2.http.Query

/**
 *  Created by LC on 2025/9/28.
 */
interface ApiService {

    @POST(Const.URL_LOGIN)
    suspend fun login(@Body body: RequestBody): Res<UserBean>

    @POST(Const.URL_REGISTER)
    suspend fun register(@Body body: RequestBody): Res<UserBean>

    @GET(Const.URL_GET_VIDEOS)
    suspend fun getVideos(
        @Query(Const.PARAM_CURRENT_PAGE) currentPage: Int,
        @Query(Const.PARAM_PAGE_SIZE) pageSize: Int
    ): Res<List<VideoBean>>

    @POST(Const.URL_LIKE_VIDEO)
    suspend fun likeVideo(@Query(Const.PARAM_VIDEO_ID) videoId: Int): Res<String>

    @POST(Const.URL_UN_LIKE_VIDEO)
    suspend fun unLikeVIdeo(@Query(Const.PARAM_VIDEO_ID) videoId: Int): Res<String>

    @POST(Const.URL_FOLLOW_AUTH)
    suspend fun followAuth(@Body body: RequestBody): Res<String>

    @GET(Const.URL_GET_COMMENT)
    suspend fun getComment(@Query(Const.PARAM_VIDEO_ID) videoId: Int): Res<List<CommentBean>>
}